<template>
  <div class="user_note_main">
    <div class="row block center pt-3 pl-2 ml-1 border-bottom pb-3"
         style="background-color:rgba(255,255,255,0)">
      <div class="pt-1 pl-4" >
        <el-page-header @back="goBack">
        </el-page-header>
      </div>
    </div>
    <div class="note_main p-5">
      <h2 align="center" style="font-weight: bold">{{newRecord.record_title}}</h2>
      <div class="content">
        <p>{{newRecord.record_content}}</p>
      </div>
    </div>


  </div>
</template>

<script>
import {getRecordByID} from "@/api/Record";

export default {
  name: "user_one_note",
  data(){
    return{
      //接收参数
      record_id:this.$route.query.record_id,

      newRecord:{
        record_title:'',
        record_content:'',
      },

      nullContainer: "暂无笔记~",


    }
  },
  methods:{
    //根据record_id获取记录本信息
    init(){
      getRecordByID({
        record_id:this.$route.query.record_id
      }).then(res=>{
        this.newRecord.record_title=res.data.data.record_title;
        this.newRecord.record_content=res.data.data.record_content;
      })

    },
    //返回上一页
    goBack() {
      this.$router.go(-1);
    },


  },
  created() {
    let _this=this;
    _this.init();
  }
}
</script>

<style scoped>
.content p{
  /*display: -webkit-box;*/
  /*overflow: hidden;*/
  letter-spacing:3px;
}
</style>
